﻿using System.Configuration;
using LaunchPad.Core;

namespace LaunchPad
{
    public class LaunchPadSettings : ApplicationSettingsBase
    {
        [UserScopedSetting]
        public ProductCollection Products
        {
            get
            {
                return (ProductCollection)this["Products"];
            }

            set
            {
                this["Products"] = value;
            }
        }

        [UserScopedSetting]
        public string SerialPort
        {
            get
            {
                var serialPort = this["SerialPort"];
                if (serialPort != null)
                    return (string) serialPort;
                return null;
            }
            set { this["SerialPort"] = value; }
        }
    }
}
